
package com.xbongbong.saas.domain.dao;

import com.xbongbong.saas.domain.entity.LikeEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;


public interface LikeDao {

    Long insert(LikeEntity like);

    Integer update(LikeEntity like);

    Integer deleteByKey(@Param("key") Integer key, @Param("corpid") String corpid);

    LikeEntity getByKey(@Param("key") Integer key, @Param("corpid") String corpid);


    List<LikeEntity> findEntitys(@Param("param") Map<String, Object> param);

    Integer getEntitysCount(@Param("param") Map<String, Object> param);

    /**
     * 批量更新点赞表中某公司某用户的姓名和头像
     *
     * @param corpid
     * @param userId
     * @param userName
     * @param userAvatar
     *
     * @return
     */
    Integer dataConsistencyUpdateUser(@Param("corpid") String corpid, @Param("userId") String userId, @Param("userName") String userName, @Param("userAvatar") String userAvatar);

    List<Map<String, Object>> getRefIdCountMap(@Param("param") Map<String, Object> param);

    Integer insertBatch(@Param("list") List<LikeEntity> list);

}